const BaseIpcHandler = require('../BaseIpcHandler');

class DeleteCaptureImagesHandler extends BaseIpcHandler {
    async handle(event, params) {
        // 解析参数
        // console.log('>> DeleteCaptureImagesHandler params = ', params);
        const { dir } = params;

        // 业务逻辑
        let result = await this.app.mapwnd.deleteCaptures(dir);

        // 返回结果
        if (event.from === 'localserver') {
            event.resp.send(result);
        } else {
            return result;
        }
    }
}

module.exports = DeleteCaptureImagesHandler;
